package com.worldcup.service.impl;

import com.worldcup.dao.GameMapper;
import com.worldcup.model.Game;
import com.worldcup.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author duwan.zq
 * @date 2018/05/29
 */
@Service
public class GameServiceImpl implements GameService{

    @Autowired
    private GameMapper gameMapper;

    @Override
    public List<Game> listGameByGroup(String group, String city, String team) {
        return gameMapper.selectByGroup(group, city, team, null);
    }

    @Override
    public List<Game> listGameByGroup(String group, String city, String team, Integer limit) {
        return gameMapper.selectByGroup(group, city, team, limit);
    }

    @Override
    public List<Game> listGameByMatchType(String type) {
        return gameMapper.selectByType(type);
    }
}
